﻿<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>我的简历 - 锐聘网</title>
    <link href="../css/base.css" type="text/css" rel="stylesheet"/>
    <link href="../css/my_resume.css" type="text/css" rel="stylesheet"/>
    <meta content="大学生求职,大学生就业,大学生招聘,IT人才,IT人才招聘,大学生名企招聘,,大学生找工作,IT名企招聘，IT行业招聘，IT企业快速入职" name="keywords">
    <meta content="锐聘专注于为企业提供高效的人力资源解决方案，同时面向IT类技术人才推出快速一站式免费就业服务。秉承QST青软实训人才服务理念，为数千家企业量身定做个性化、全程化的人才培养体系，同时帮助中高级人才铺设成功之路，为人才和企业架设起沟通之桥。"
          name="description">

</head>

<body>
<iframe src="../top.jsp" width="100%" height="100" scrolling="no" frameborder="0"></iframe>

<div class="resume_con">
    <!--tab设置-->
    <div class="user_operate">
        <ul style="float:left">
            <li><a href="resume.jsp" class="active">我的简历</a></li>
            <li><a href="jobApply.jsp">我的申请</a></li>
            <div class="clear"></div>
        </ul>
        <div class="clear"></div>
    </div>
    <!--主体部分-->
    <div class="resume_main">
        <!--左边-->
        <div class="resume_left">
            <div class="resume_title">
                <div style="float:left">基本信息</div>
            </div>
            <div class="all_resume">
                <div class="table_style">
                    <table width="300" border="0" cellpadding="3" cellspacing="1" bgcolor="#EEEEEE">
                        <tr>
                            <th width="110" align="right" bgcolor="#F8F8F8">姓名：</th>
                            <td bgcolor="#F8F8F8"><input type="text" name="realname" value=""></td>
                        </tr>
                    </table>
                    <div class="he"></div>
                    <table width="300" border="0" cellpadding="3" cellspacing="1" bgcolor="#EEEEEE">
                        <tr>
                            <th width="110" align="right" bgcolor="#F8F8F8">性别：</th>
                            <td bgcolor="#F8F8F8">
                                <form id = "toolFrom">
                                <input type="radio" name="tool" value="男" >男
                                <input type="radio" name="tool" value="女">女
                                </form>
                            </td>
                        </tr>
                    </table>
                    <div class="he"></div>
                    <table width="300" border="0" cellpadding="3" cellspacing="1" bgcolor="#EEEEEE">
                        <tr>
                            <th width="110" align="right" bgcolor="#F8F8F8">出生日期：</th>
                            <td bgcolor="#F8F8F8"><input type="date" name="birthday" value=""></td>
                        </tr>
                    </table>
                    <div class="he"></div>


                    <table width="300" border="0" cellpadding="3" cellspacing="1" bgcolor="#EEEEEE">
                        <tr>
                            <th width="110" align="right" bgcolor="#F8F8F8">当前所在地：</th>
                            <td bgcolor="#F8F8F8"><input type="text" name="current_loc" value=""></td>
                        </tr>
                    </table>
                    <div class="he"></div>

                    <table width="300" border="0" cellpadding="3" cellspacing="1" bgcolor="#EEEEEE">
                        <tr>
                            <th width="110" align="right" bgcolor="#F8F8F8">户口所在地：</th>
                            <td bgcolor="#F8F8F8"><input type="text" name="resident_loc" value=""></td>
                        </tr>
                    </table>
                    <div class="he"></div>

                    <table width="300" border="0" cellpadding="3" cellspacing="1" bgcolor="#EEEEEE">
                        <tr>
                            <th width="110" align="right" bgcolor="#F8F8F8">手机：</th>
                            <td bgcolor="#F8F8F8"><input type="text" name="telephone" value=""></td>
                        </tr>
                    </table>
                    <div class="he"></div>
                    <table width="300" border="0" cellpadding="3" cellspacing="1" bgcolor="#EEEEEE">
                        <tr>
                            <th width="110" align="right" bgcolor="#F8F8F8">邮件：</th>
                            <td bgcolor="#F8F8F8"><input type="text" name="email" value=""></td>
                        </tr>
                    </table>
                    <div class="he"></div>
                    <table width="300" border="0" cellpadding="3" cellspacing="1" bgcolor="#EEEEEE">
                        <tr>
                            <th width="110" align="right" bgcolor="#F8F8F8">求职意向：</th>
                            <td bgcolor="#F8F8F8"><input type="text" name="job_intension" value="前端开发"></td>
                        </tr>
                    </table>
                    <div class="he"></div>
                    <table width="300" border="0" cellpadding="3" cellspacing="1" bgcolor="#EEEEEE">
                        <tr>
                            <th width="110" align="right" bgcolor="#F8F8F8">工作经验：</th>
                            <td bgcolor="#F8F8F8"><input type="text" name="job_experience" value="应届毕业生"></td>
                        </tr>
                    </table>
                    <div class="he"></div>
                    <div style="margin-left:100px;">
                        <input name="save" type="submit" class="save1" value="保存">
                        <input name="cancel" type="reset" class="cancel2" value="取消">
                    </div>
                </div>
                <div style="float:right" class="uploade"><img src="../images/person_img.jpg">
<!--                    <div align="center">-->
<!--                        <a href="resumeBasicInfoPicUpload.jsp" class="uploade_btn">更换照片</a>-->
<!--                    </div>-->
                </div>
                <div class="clear"></div>
            </div>
        </div>
        <!--右边-->
        <iframe src="resume_right.jsp" width="290" height="650" scrolling="no" frameborder="0"></iframe>
        <div style="clear:both"></div>
    </div>
</div>

<iframe src="../foot.jsp" width="100%" height="150" scrolling="no" frameborder="0"></iframe>
<script src="../js/axios-0.18.0.js"></script>
<script>
    var save1 = document.getElementsByClassName('save1')[0];
    //console.log(save1)

    //获取表单对象
    let _realname = document.getElementsByName('realname')[0];//真实姓名


    let _gender = document.getElementById('toolFrom');//性别

    //单选框选择改变事件
    var __gender="";
    var tools = document.getElementsByName('tool');
    for(var i=0;i<tools.length;i++){
        tools[i].index = i;
        tools[i].onclick = function (){
            __gender = tools[this.index].value;
        }
        //alert(__gender);
    }
    // 表单内选中的项发生改变时会调用该方法









     let _birthday = document.getElementsByName('birthday')[0];//出生日期

     let _current_loc = document.getElementsByName('current_loc')[0];//当前所在地

     let _resident_loc = document.getElementsByName('resident_loc')[0];//户口所在地


     let _telephone = document.getElementsByName('telephone')[0];//手机号


     let _email = document.getElementsByName('email')[0];//邮箱

    let _job_intension = document.getElementsByName('job_intension')[0];//求职意向

    let _job_experience = document.getElementsByName('job_experience')[0];//工作经验

    let realname,gender,birthday,current_loc,resident_loc,telephone,email,job_intension,job_experience;




    //保存按钮点击事件
    save1.onclick = function (){
        realname = _realname.value;
        gender=__gender;
        birthday=_birthday.value;
        current_loc=_current_loc.value;
        resident_loc=_resident_loc.value;
        telephone=_telephone.value;
        email=_email.value;
        job_intension=_job_intension.value;
        job_experience=_job_experience.value;

        axios({
            method:"post",
            url: "http://localhost:8080/itoffer/resumeAddServlet?",
            params:{
                realname:realname,
                gender:gender,
                birthday:birthday,
                current_loc:current_loc,
                resident_loc:resident_loc,
                telephone:telephone,
                email:email,
                job_intension:job_intension,
                job_experience:job_experience,
            }
        }).then(function (resp){
            if(resp.data=="addSuccess"){
                alert("添加成功")
                window.location.href = "http://localhost:8080/itoffer/resume/selectCurrentResumeByApplicant_id"
            }else{
                //添加失败，
                alert("添加失败，请检查表单是否输入完整")
                window.location.href = "http://localhost:8080/itoffer/applicant/resumeBasicInfoAdd.html"
            }
        })
    }


</script>
</body>
</html>
